/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.entidad;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Abner Bastarrachea
 */
@Entity
@Table(name = "type_user")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TypeUser.findAll", query = "SELECT t FROM TypeUser t"),
    @NamedQuery(name = "TypeUser.findByPkTypeUser", query = "SELECT t FROM TypeUser t WHERE t.pkTypeUser = :pkTypeUser"),
    @NamedQuery(name = "TypeUser.findByTypeUser", query = "SELECT t FROM TypeUser t WHERE t.typeUser = :typeUser")})
public class TypeUser implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "pkTypeUser")
    private Integer pkTypeUser;
    @Column(name = "typeUser")
    private String typeUser;

    public TypeUser() {
    }

    public TypeUser(Integer pkTypeUser) {
        this.pkTypeUser = pkTypeUser;
    }

    public Integer getPkTypeUser() {
        return pkTypeUser;
    }

    public void setPkTypeUser(Integer pkTypeUser) {
        this.pkTypeUser = pkTypeUser;
    }

    public String getTypeUser() {
        return typeUser;
    }

    public void setTypeUser(String typeUser) {
        this.typeUser = typeUser;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pkTypeUser != null ? pkTypeUser.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TypeUser)) {
            return false;
        }
        TypeUser other = (TypeUser) object;
        if ((this.pkTypeUser == null && other.pkTypeUser != null) || (this.pkTypeUser != null && !this.pkTypeUser.equals(other.pkTypeUser))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.entidad.TypeUser[ pkTypeUser=" + pkTypeUser + " ]";
    }
    
}
